frame: Don't move border gadget and child down
authorTimm Bäder <mail@baedert.org>
Fri, 26 Feb 2016 13:09:28 +0000 (14:09 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 28 Feb 2016 14:24:21 +0000 (09:24 -0500)
Setting label-yalign should affect the border gadget, but we need to
compensate for its position by moving the child down or up, depending on
the border gadget's position, so the child never moves.

https://bugzilla.gnome.org/show_bug.cgi?id=762123

gtk/gtkframe.c

index d363d41fb11831263f00d861ffd96c3b74e2db04..3fcb6417fd973dbb698e9ebd666d796dc481ed83 100644 (file)
@@ -867,7 +867,7 @@ gtk_frame_allocate_border (GtkCssGadget        *gadget,
 
   if (priv->label_widget &&
       gtk_widget_get_visible (priv->label_widget))
-    height_extra = priv->label_allocation.height * priv->label_yalign;
+    height_extra = priv->label_allocation.height * (1 - priv->label_yalign);
   else
     height_extra = 0;